<%@page import="java.awt.Window"%>
<%@ page import="ilikethat.*"%>
<%@ page import="java.sql.*"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%
	
	String facebookID = request.getParameter("FbId");
	String category = request.getParameter("cat");
	
	LobbyGame game = new LobbyGame(category, facebookID);
	

	
	int gameID = Select.getGameIDByPlayerID(facebookID);
	
	if (gameID == 0) {
		gameID = Select.getGameIDByPlayerID2(facebookID);
	}
%>

<script type="text/javascript">
	$(document).ready(function() {
		gameID = <%=gameID%>;
		console.log(gameID);
		window.open("../jsp/game.jsp?gameID=" + gameID + "");
	});
</script>


